<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
	<xsl:param name="DOTNET2"/>



	<xsl:template match="HeaderInfo">

<![CDATA[


var EMPTY_GUID = '00000000-0000-0000-0000-000000000000';

function GuidGen()
{
	var guid='';
	
	for (var i = 1; i <= 32; i++)
	{
		var n = Math.floor(Math.random() * 16.0).toString(16);
		guid += n;
		if ((i == 8) || (i == 12) || (i == 16) || (i == 20))
		guid += "-";
	}

	return guid;
}


function Loading() {
	YAHOO.util.Dom.setStyle('loader','display','inline');
}


function Loaded() {
	YAHOO.util.Dom.setStyle('loader','display','none');
}


function clearDropDownList(id) {

	YAHOO.util.Dom.get(id).options.length=0;

}


function populateDropDownList( id, vals , selected) {
	var _opt=YAHOO.util.Dom.get(id);

	for(i=0;i<vals.length;i++) {
		_opt.options[_opt.options.length]=new Option(vals[i],i);
		
		if ( i  == selected ) _opt.selectedIndex = i;
	}

}


function populateDropDownListClass( id, vals , selected) {
	var _opt=YAHOO.util.Dom.get(id);

	for(i=0;i<vals.length;i++) {
		_opt.options[_opt.options.length]=new Option(vals[i].Name,vals[i].ObjectID);
		
		if ( vals[i].ObjectID  == selected ) _opt.selectedIndex = i;
	}

}


function getSelectedDropDownValue ( id )
{

	var _opt = YAHOO.util.Dom.get ( id );
	
	return _opt.options[_opt.selectedIndex].value;
}




function addLoadEvent(func) {
	var oldonload = window.onload;
	
	if (typeof window.onload != "function") {
		window.onload = func;
	} else {
		window.onload = function () {
			oldonload();
			func();
		}
	}
}

addLoadEvent(function () {
	initChecklist();
});

function initChecklist() {
	if (document.all && document.getElementById) {
		// Get all unordered lists
		var lists = document.getElementsByTagName("ul");
		
		for (i = 0; i < lists.length; i++) {
			var theList = lists[i];
			
			// Only work with those having the class "checklist"
			if (theList.className.indexOf("checklist") > -1) {
				var labels = theList.getElementsByTagName("label");
				
				// Assign event handlers to labels within
				for (var j = 0; j < labels.length; j++) {
					var theLabel = labels[j];
					theLabel.onmouseover = function() { this.className += " hover"; };
					theLabel.onmouseout = function() { this.className = this.className.replace(" hover", ""); };
				}
			}
		}
	}
}
]]>

	</xsl:template>
</xsl:stylesheet>
